{include file="default/base/header" /}
<div class='page'>
    <form method="post" name="remark_form" id="remark_form" >
        <input type="hidden" value="{$commonids}" name="commonids">
        <table class="ds-default-table nobdb">
            <tr>
                <td><label>商品名及规格值</label></td>
                <td><label>分类名称</label></td>
                <td><label>品牌名称</label></td>
                {if $member_type == 1}
                <td><label>平台分享价</label></td>
                {else /}
                <td><label>平台分享价</label></td>
                {/if}
<!--                <td><label>设置加价（元）</label></td>-->
            </tr>
            <?php foreach($goods_info as $k=>$v){?>
            <input name="goods_id[]"  value="{$v.goods_id}" type="hidden">
            <tr>
                <td ><?php echo $v['goods_name']; ?></td>
                <td >{$goods.gc_name}</td>
                <td >{$goods.brand_name}</td>
                {if $member_type == 1}
                <td><label><?php echo $v['g_price']; ?>元</label></td>
                {else /}
                <td><label><?php echo $v['t_price']; ?>元</label></td>
                {/if}
                <!--                 <td><input id="percentage_fare_increase_method"  name="t_value[]"  value="{$goods_info.t_value|default='0'}" type="text" checked="checked"></td>-->
<!--                <td><input id="percentage_fare_increase_method"  name="t_value[]"  value="{$v.markup_price|default='0'}" type="text" checked="checked"></td>-->
            </tr>
            <?php }?>
        </table>
        <table class="ds-default-table nobdb">
            <tbody>
            <tr class="noborder" >
                <td class="vatop rowform onoff">
                    <textarea id="installation_fee_ero" name="content"></textarea>
                </td>
            </tr>
            </tbody>
            <tfoot>
            <tr class="tfoot">
                <td colspan="2">
                    <input type='submit' class="btn"  value="导入"/>
                </td>
            </tr>
            </tfoot>
        </table>
    </form>
</div>
<script>
    $(function() {
        $("#installation_fee_ero_one").hide();
        $("#installation_fee_ero").hide();

        $('input[name="status"]').click(function() {
            if ($(this).val() == 1) {
                $("#installation_fee_ero_one").hide();
                $("#installation_fee_ero").hide();
            } else {
                $("#installation_fee_ero_one").show();
                $("#installation_fee_ero").show();
            }
        });
    });
    function set_price(ids_str) {
        _uri = ADMINSITEURL+"/Product/set_price?commonid=" + ids_str;
        dsLayerOpen(_uri,'设置价格','800px','700px');

    }

    // 批量处理
    $('a[id="pi_ids"]').click(function(){
        ids_str = getItems();
        /*alert(ids_str);return false;*/
        if (ids_str) {
            goods_verify(ids_str);
        }
    });

    // 获得选中ID
    function getItems() {
        /* 获取选中的项 */
        var items = '';
        $('.checkitem:checked').each(function () {
            items += this.value + ',';
        });
        if (items != '') {
            items = items.substr(0, (items.length - 1));
        }else{
            layer.alert('{$Think.lang.please_select_input}', {icon: 2})
        }
        return items;
    }

    // 商品加价页面
    function goods_verify(ids_str) {
        _uri = ADMINSITEURL+"/Product/set_price?commonid=" + ids_str;
        dsLayerOpen(_uri,'{$Think.lang.goods_verify}','800px','700px');
    }




</script>